﻿using PersistentObject.Common.Attributes;
using PersistentObject.Common.DataConvertors;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersistentObject.StudentTest.Entities
{
    public abstract class BasicClass
    {
        [Key]
        public int Id { get; set; }

        public bool BOOL { get; set; }

        public int INT { get; set; }

        public string STRING { get; set; }

        [Convertor(typeof(ImageConvertor))]
        public Image IMAGE { get; set; }

        public DateTime DATETIME { get; set; }

        public decimal DECIMAL { get; set; }

    }

    public class ClassA : BasicClass
    {
        //public int SMALLINT { get; set; }

        [ForeignKey]
        public ClassB ClassBId { get; set; }

        [ForeignKey]
        public ClassB ClassBId2 { get; set; }

        [ForeignKey]
        public ClassD ClassDId { get; set; }
    }

    public class ClassB : BasicClass
    {
        [ForeignKey]
        public ClassB ClassBId { get; set; }
    }

    public class ClassD :BasicClass
    {
        [ForeignKey]
        public ClassE ClassEId { get; set; }
    }

    public class ClassE : BasicClass
    {
        [ForeignKey]
        public ClassD ClassDId { get; set; }
    }
}
